<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class template max_size_decorator_terminal</title>
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../index.html" title="Chapter 1. Boost.Log v2">
<link rel="up" href="../../../expressions.html#header.boost.log.expressions.formatters.max_size_decorator_hpp" title="Header &lt;boost/log/expressions/formatters/max_size_decorator.hpp&gt;">
<link rel="prev" href="max_size_decorator_actor.html" title="Class template max_size_decorator_actor">
<link rel="next" href="max_size_idm45961920724016.html" title="Function template max_size_decor">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="max_size_decorator_actor.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../expressions.html#header.boost.log.expressions.formatters.max_size_decorator_hpp"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="max_size_idm45961920724016.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.log.expressions.max_size_idm45961920754144"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template max_size_decorator_terminal</span></h2>
<p>boost::log::expressions::max_size_decorator_terminal</p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../../expressions.html#header.boost.log.expressions.formatters.max_size_decorator_hpp" title="Header &lt;boost/log/expressions/formatters/max_size_decorator.hpp&gt;">boost/log/expressions/formatters/max_size_decorator.hpp</a>&gt;

</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> SubactorT<span class="special">,</span> <span class="keyword">typename</span> CharT<span class="special">&gt;</span> 
<span class="keyword">class</span> <a class="link" href="max_size_idm45961920754144.html" title="Class template max_size_decorator_terminal">max_size_decorator_terminal</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
  <span class="comment">// types</span>
  <span class="keyword">typedef</span> <span class="identifier">CharT</span>                                 <a name="boost.log.expressions.max_size_idm45961920754144.char_type"></a><span class="identifier">char_type</span><span class="special">;</span>      <span class="comment">// Character type. </span>
  <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">&gt;</span>        <a name="boost.log.expressions.max_size_idm45961920754144.string_type"></a><span class="identifier">string_type</span><span class="special">;</span>    <span class="comment">// String type. </span>
  <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span>                           <a name="boost.log.expressions.max_size_idm45961920754144.size_type"></a><span class="identifier">size_type</span><span class="special">;</span>      <span class="comment">// String size type. </span>
  <span class="keyword">typedef</span> <span class="identifier">basic_formatting_ostream</span><span class="special">&lt;</span> <span class="identifier">char_type</span> <span class="special">&gt;</span> <a name="boost.log.expressions.max_size_idm45961920754144.stream_type"></a><span class="identifier">stream_type</span><span class="special">;</span>    <span class="comment">// Stream type. </span>
  <span class="keyword">typedef</span> <span class="identifier">SubactorT</span>                             <a name="boost.log.expressions.max_size_idm45961920754144.subactor_type"></a><span class="identifier">subactor_type</span><span class="special">;</span>  <span class="comment">// Adopted actor type. </span>
  <span class="keyword">typedef</span> <span class="identifier">string_type</span>                           <a name="boost.log.expressions.max_size_idm45961920754144.result_type"></a><span class="identifier">result_type</span><span class="special">;</span>    <span class="comment">// Result type definition. </span>

  <span class="comment">// <a class="link" href="max_size_idm45961920754144.html#boost.log.expressions.max_size_idm45961920754144construct-copy-destruct">construct/copy/destruct</a></span>
  <a class="link" href="max_size_idm45961920754144.html#idm45961920729536-bb"><span class="identifier">max_size_decorator_terminal</span></a><span class="special">(</span><span class="identifier">subactor_type</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">size_type</span><span class="special">,</span> 
                              <span class="identifier">string_type</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="special">=</span> <span class="identifier">string_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="max_size_idm45961920754144.html#idm45961920726464-bb"><span class="identifier">max_size_decorator_terminal</span></a><span class="special">(</span><a class="link" href="max_size_idm45961920754144.html" title="Class template max_size_decorator_terminal">max_size_decorator_terminal</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="max_size_idm45961920754144.html#idm45961920724768-bb"><span class="identifier">max_size_decorator_terminal</span></a><span class="special">(</span><span class="special">)</span> <span class="special">=</span> <span class="keyword">delete</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="max_size_idm45961920754144.html#idm45961920742464-bb">public member functions</a></span>
  <span class="identifier">subactor_type</span> <span class="keyword">const</span>  <span class="special">&amp;</span> <a class="link" href="max_size_idm45961920754144.html#idm45961920741904-bb"><span class="identifier">get_subactor</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">size_type</span> <a class="link" href="max_size_idm45961920754144.html#idm45961920739792-bb"><span class="identifier">get_max_size</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="identifier">string_type</span> <span class="keyword">const</span>  <span class="special">&amp;</span> <a class="link" href="max_size_idm45961920754144.html#idm45961920737680-bb"><span class="identifier">get_overflow_marker</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> ContextT<span class="special">&gt;</span> <span class="identifier">result_type</span> <a class="link" href="max_size_idm45961920754144.html#idm45961920735568-bb"><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span></a><span class="special">(</span><span class="identifier">ContextT</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> ContextT<span class="special">&gt;</span> <span class="identifier">result_type</span> <a class="link" href="max_size_idm45961920754144.html#idm45961920732768-bb"><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span></a><span class="special">(</span><span class="identifier">ContextT</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="idm46846469842416"></a><h2>Description</h2>
<p>String size limiting decorator terminal class. This formatter allows to limit the maximum total length of the strings generated by other formatters.</p>
<p>The <code class="computeroutput"><a class="link" href="max_size_idm45961920754144.html" title="Class template max_size_decorator_terminal">max_size_decorator_terminal</a></code> class aggregates the formatter being decorated, the maximum string length it can produce and an optional truncation marker string, which will be put at the end of the output if the limit is exceeded. Note that the marker length is included in the limit and as such must not exceed it. The <code class="computeroutput"><a class="link" href="max_size_idm45961920754144.html" title="Class template max_size_decorator_terminal">max_size_decorator_terminal</a></code> class is a formatter itself, so it can be used to construct more complex formatters, including nesting decorators. </p>
<div class="refsect2">
<a name="idm46846469838240"></a><h3>
<a name="boost.log.expressions.max_size_idm45961920754144construct-copy-destruct"></a><code class="computeroutput">max_size_decorator_terminal</code> 
        public
       construct/copy/destruct</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><a name="idm45961920729536-bb"></a><span class="identifier">max_size_decorator_terminal</span><span class="special">(</span><span class="identifier">subactor_type</span> <span class="keyword">const</span> <span class="special">&amp;</span> sub<span class="special">,</span> <span class="identifier">size_type</span> max_size<span class="special">,</span> 
                            <span class="identifier">string_type</span> <span class="keyword">const</span> <span class="special">&amp;</span> overflow_marker <span class="special">=</span> <span class="identifier">string_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre>
<p>Initializing constructor. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="idm45961920726464-bb"></a><span class="identifier">max_size_decorator_terminal</span><span class="special">(</span><a class="link" href="max_size_idm45961920754144.html" title="Class template max_size_decorator_terminal">max_size_decorator_terminal</a> <span class="keyword">const</span> <span class="special">&amp;</span> that<span class="special">)</span><span class="special">;</span></pre>
<p>Copy constructor </p>
</li>
<li class="listitem"><pre class="literallayout"><a name="idm45961920724768-bb"></a><span class="identifier">max_size_decorator_terminal</span><span class="special">(</span><span class="special">)</span> <span class="special">=</span> <span class="keyword">delete</span><span class="special">;</span></pre></li>
</ol></div>
</div>
<div class="refsect2">
<a name="idm46846469812464"></a><h3>
<a name="idm45961920742464-bb"></a><code class="computeroutput">max_size_decorator_terminal</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="identifier">subactor_type</span> <span class="keyword">const</span>  <span class="special">&amp;</span> <a name="idm45961920741904-bb"></a><span class="identifier">get_subactor</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>Adopted subactor </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">size_type</span> <a name="idm45961920739792-bb"></a><span class="identifier">get_max_size</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>Max string size limit </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">string_type</span> <span class="keyword">const</span>  <span class="special">&amp;</span> <a name="idm45961920737680-bb"></a><span class="identifier">get_overflow_marker</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Returns:</span></p></td>
<td><p>Max string size limit </p></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> ContextT<span class="special">&gt;</span> <span class="identifier">result_type</span> <a name="idm45961920735568-bb"></a><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span><span class="special">(</span><span class="identifier">ContextT</span> <span class="keyword">const</span> <span class="special">&amp;</span> ctx<span class="special">)</span><span class="special">;</span></pre>
<p>Invokation operator </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> ContextT<span class="special">&gt;</span> <span class="identifier">result_type</span> <a name="idm45961920732768-bb"></a><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span><span class="special">(</span><span class="identifier">ContextT</span> <span class="keyword">const</span> <span class="special">&amp;</span> ctx<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>Invokation operator </p>
</li>
</ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2007-2021 Andrey Semashev<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>).
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="max_size_decorator_actor.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../expressions.html#header.boost.log.expressions.formatters.max_size_decorator_hpp"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="max_size_idm45961920724016.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
